Can't assign (RTC) defect to (QM) executionresult via API
I'm trying to create/update a QM executionresult that, in a particular step, has a CCM workitem attached.
If I create the executionresult via Jazz web interface and then check it via API, the execution result XML looks like the following, in which the workitem is attached to a property into the stepResult object (see properties tag):
<ns16:stepResults>
I've tried (all via API):
Any clues on what could I be missing?
|
Accepted answer
I now have a solution that works.
Now the defect appears linked to the step in the execution result.
Thank you for the support and sorry if I was approaching the problem in a wrong way from the beginning. I guess I should have only used the OSLC API but I found the Reportable API more convenient for some of the operations.
Ralph Schoon selected this answer as the correct answer
Comments
Ralph Schoon
commented May 06 '22, 2:16 a.m.
| edited May 06 '22, 2:17 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
Thanks for sharing.
There are limitations in the OSLC API, so best use whatever works for you, I guess.
PS: I am not able to create the link in the work item by saving a test case using the reportable REST API. My assumption is, that the link need to be created in EWM in that case. Note that https://jazz.net/wiki/bin/view/Main/RqmApi#Notable_changes_from_ETM_7_0_1_t mentioned the API change for work item and advertises to use the ETM OSLC API for work item linking. |
3 other answers
Ralph Schoon (63.6k●3●36●46)
| answered May 04 '22, 2:53 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER edited May 04 '22, 2:54 a.m.
I am not sure what you are trying to do there and what API you refer to, but this is what a link to a work item in a ETM artifact would look like in the OSLC API (the link type could be different.):
Comments Yes sorry I am talking about the OSLC API. I am attaching a Jazz web interface screenshot of what I am trying to replicate via OSLC API.
Here is how the OSLC API shows the link in the execution result. That format is what I am trying to use to replicate the link of the defect to the execution result.
I can't see the images. Try to use Chrome to attach them. Please edit your comment.
Enrique Sánchez
commented May 04 '22, 12:56 p.m.
Updated. Images should be visible now Your linked work item is a PROPERTY of the enclosed test step and not a LINK to the execution result you are saving. I am not sure if there is a way to modify the step result. I would try to have a link on the executionresult level first, before becoming adventurous. |
Ralph Schoon (63.6k●3●36●46)
| answered May 05 '22, 2:19 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER edited May 05 '22, 3:31 a.m.
This is a typical case of wasting time on the forum because the most basic information needed is not in the question in the first place. This is especially crucial if you ask about APIs. If you had provided an example link that you GET/POST we could have solved the mystery already.
1. Jazz products have many APIs. There are internal APIs, there are common/shared APIS such as the Jazz process
API, there are REST APIs, there are SDK's and Java or Java Script APIs.
Bookmark this page: https://jazz.net/wiki/bin/view/Deployment/CLMProductAPILanding
Read that page to understand the APIs available to you.
Understand which API you are trying to use and name it in questions.
Version numbers might be important.
See https://jazz.net/forum/questions/203755/how-should-i-ask-a-question-in-the-forum-if-i-want-to-receive-useful-answers for additional suggestions.
2. For RQM/ETM, in addition to the ones already mentioned there is an OSLC API and there is a REPORTABLE REST API.
As far as I can tell, just seeing the URL you try to use containing IIntegrationService in detail service/com.ibm.rqm.integration.service.IIntegrationService tells us you are trying to use the REPORTABLE REST API in the hope to be able to link the work item. In my mind the Reportable REST APIs are for reporting. They seem to support POST and PUT, but I have no examples for how that all works. Sorry, I have not much experience with the Reportable REST API and if you can link items that way.
I was talking about the OSLC API. I know the OSLC API and you definitely can link items using that one.
Comments https://jazz.net/forum/questions/279587/how-to-create-test-result-via-reportable-rest-api-oslc-api-in-etm might be a good place to start about this. I am not sure. There might be other examples if you google for RQM reportable rest API RQM site:jazz.net and maybe throw PUT or POST into the first part of the search string.
PS: Only RQM allows to create/update anything using the reportable REST API, all other applications only allow it for getting information. Maybe using the RQM URL Util provides better feedback. Not sure.
Enrique Sánchez
commented May 05 '22, 4:23 a.m.
Sorry for the lack of clarity and wasting of time! Thanks for the information links.
From what I get from the OSLC QM V2 API (https://[IP]:9443/qm/oslc_qm/contexts/[IP]/resources/com.ibm.rqm.execution.ExecutionResult), there is only a affectedByChangeRequest section that links the defect to the execution result, but that does not provide information about which step the defect is linked to. So, I can link the defect but it only appears as related to the execution result and can't be traced to a step.
The ETM Reportable REST API 7.0.3 does provide the information I was looking for, i.e., linking the defect as an attachment to a particular step in the execution result.
Enrique Sánchez
commented May 05 '22, 4:25 a.m.
P.S.: The creation of the executionresult works OK with the Reportable REST API, but I'm only missing the defect linking. I will be making more tests to see if I manage to do it. The ETM reportable RESt API is an API for ETM. You assume that it handles changes in links to the other applications. It is not clear if this assumption is valid and, especially, if the backlinks in the remote applications are created if necessary.
Enrique Sánchez
commented May 05 '22, 4:48 a.m.
Yes that's a good point.
The OSLC format links the step result to the execution result with the containsStepResult tag. It should be possible to link an ExecutionElementResult to the defect with its affectedByChangeRequest tag. I am trying that the next. To make this absolutely clear once and for all, there is no OSLC and no OSLC related format, information or anything else to be seen in this whole post.
Everything in this communication is reportable REST API. OSLC looks and works totally different and is not interchangeable.
showing 5 of 7
show 2 more comments
|
Ralph Schoon (63.6k●3●36●46)
| answered May 05 '22, 9:48 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER I took some time to understand the ETM/RQM Reportable REST API better. I am able to use POST and PUT to create a test case. When I copy the entry for a related work item
<ns2:relatedChangeRequest href="https://elm.example.com:9443/ccm/resource/itemName/com.ibm.team.workitem.WorkItem/45" rel="trackedBy" summary="45: Implement - Organizations may apply with an initial request"/>
from another test case and submit this in a PUT, I do not get a relationship between the work item and the test case.
It is absolutely possible that I can only create such a relationship from EWM, by creating a link in the work item. This would require the OSLC API.
If someone has other experience I would be interested in any insight that can be provided. |
Your answer
Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.
Comments
Nothing in the XML above looks like anything I would expect in RDF+XML which is the supported format for OSLC.